<!--
 * @Author      : ZhouQiJun
 * @Date        : 2025-06-03 15:10:58
 * @LastEditors : ZhouQiJun
 * @LastEditTime: 2025-06-03 18:35:18
 * @Description : 根组件
-->
<script setup lang="ts">
import { RouterLink, RouterView } from 'vue-router'
</script>

<template>
  <header class="bg-gray-100 min-h-auto">
    <nav>
      <RouterLink to="/">TodoList</RouterLink>
      <RouterLink to="/about">About</RouterLink>
    </nav>
  </header>

  <RouterView />
</template>

<style scoped>
header {
  line-height: 1.5;
}

nav {
  width: 100%;
  font-size: 12px;
  text-align: center;
}

nav a.router-link-exact-active {
  color: green;
}

nav a.router-link-exact-active:hover {
  background-color: transparent;
}

nav a {
  display: inline-block;
  padding: 0 1rem;
  border-left: 1px solid var(--color-border);
  font-size: 1.2rem;
}

nav a:first-of-type {
  border: 0;
}
</style>
